let  db = require('../db.js');

//记录管理员操作日志
exports.createdLog = async function (userId,userName,role,action,actionContent) {
   let sql=`
   INSERT  INTO operation_log(adminId,adminName,role,action,content)
   VALUES(:userId,:userName,:role,:action,:actionContent)
   ` 
  let  data = await db.query(sql,{userId,userName,role,action,actionContent});
  return data[0];
  
}